function btnMoveRight_onClick(SourceList,TargetList){
    MoveAll(SourceList,TargetList);
}

function MoveAll(SourceList,TargetList) {
 var nIndex = SourceList.selectedIndex;   //选中的第一项索引 0开始　
        //alert(nIndex);
 if (nIndex == -1){
  alert("请先选择一项！");
  return;
 }
 var len = SourceList.length;//选中项 TargtList是要进入的列表
 var start = 0;
    var tag = 0;  //记录是否在目标列表中已经存在选中项，0为没有，1为有
 for( i=0;i<len;i++) {
        tag = 0;
        nIndex = SourceList.selectedIndex;//alert(nIndex);
  if (nIndex == -1){
        return;
        }
  var objSelected = new Option(SourceList[nIndex].text, SourceList[nIndex].value);
        for(j=0;j<TargetList.length;j++) {   //此循环用于删除重复项
           if(TargetList[j].value == SourceList[nIndex].value) {
            tag = 1;
              SourceList.options[nIndex] = null;
              break;
           }
        }
        if(tag == 0) {
   TargetList.options[TargetList.length] = objSelected;
   SourceList.options[nIndex] = null;
   TargetList.options[TargetList.length-1].selected = true;
     }
    }

 if(navigator.appName=="Netscape"){
  history.go(0)
 }
}